/*
 * Camera.h
 *
 *  Created on: Jul 11, 2009
 *      Author: scott
 */

#ifndef CAMERA_H_
#define CAMERA_H_

#include "SceneGraphNode.h"

class Camera: public SceneGraphNode {
private:
    float fov;
    float aspectRatio;
    float nearClip;
    float farClip;
    irr::core::vector3df lookAt;
    irr::core::vector3df up;
public:
    Camera(SceneGraphNode *parent = NULL, bool ownsChildren = false);
    virtual ~Camera();

    // to use the camera
    void applyProj();
    void applyView();

    virtual void update();

    // accessors
    float getAspectRatio() const
    {
        return aspectRatio;
    }

    float getFarClip() const
    {
        return farClip;
    }

    float getFov() const
    {
        return fov;
    }

    float getNearClip() const
    {
        return nearClip;
    }

    void setAspectRatio(float aspectRatio)
    {
        this->aspectRatio = aspectRatio;
    }

    void setFarClip(float farClip)
    {
        this->farClip = farClip;
    }

    void setFov(float fov)
    {
        this->fov = fov;
    }

    void setNearClip(float nearClip)
    {
        this->nearClip = nearClip;
    }

    irr::core::vector3df getLookAt() const
    {
        return lookAt;
    }

    irr::core::vector3df getUp() const
    {
        return up;
    }

    void setLookAt(irr::core::vector3df lookAt)
    {
        this->lookAt = lookAt;
    }

    void setUp(irr::core::vector3df up)
    {
        this->up = up;
    }

};

#endif /* CAMERA_H_ */
